package com.ee.chat.common.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ee.chat.common.entity.HostLevelConfig;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author Shane
 * @since 2019-08-23
 */
public interface HostLevelConfigMapper extends BaseMapper<HostLevelConfig> {
    HostLevelConfig selectByUserId(@Param("userId") Integer userId);

    /**
     * 获取主播通话价格列表
     * @Author Shane
     * @Date 2019/10/8 18:12
     * @param
     * @return
     */
    List<Map<String, Object>> getCharges(@Param("level") Integer level);

    /**
     * 根据主播等级查询
     * @Author Shane
     * @Date 2019/10/10 1:03
     * @param
     * @return
     */
    HostLevelConfig selectByLevel(@Param("level") Integer level);

    /**
     * 获取主播等级
     * @Author Shane
     * @Date 2019/12/25 11:56
     * @param
     * @return
     **/
    Integer getUserLevel(@Param("credit") Double credit);

}